home *** CD-ROM | disk | FTP | other *** search
/ United Public Domain Gold 2 / United Public Domain Gold 2.iso / education / pe038.dms / pe038.adf / parent.AMOS / parent.amosSourceCode
AMOS Source Code  |  1991-10-31  |  33KB  |  1,401 lines

  1. Set Buffer 32 : Close Workbench : Close Editor 
  2. Dim MNU$(6,6),ITEM$(6),COMPLETED(6),X(20),MAGWRD$(500),TEMP$(500),WRD$(500),WRD(5),QUESTION$(5,8),QUESTION(5),RESULT$(5,48)
  3. Break Off 
  4. Gosub VARIABLE_LOAD
  5. Rem For I=1 To 15
  6. Rem   Channel I To Bob I 
  7. Rem Next I 
  8. Rem Priority On  
  9. Default Palette 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,$EA0
  10. MNU$(0,0)="OFF"
  11. MNU$(0,1)="ON "
  12. MNU$(1,0)="LOW   "
  13. MNU$(1,1)="MEDIUM"
  14. MNU$(1,2)="HIGH  "
  15. MNU$(3,0)="ALL     "
  16. MNU$(3,1)="FLASH   "
  17. MNU$(3,2)="COMPLETE"
  18. MNU$(3,3)="CRACK-IT"
  19. MNU$(3,4)="HANG-UP "
  20. MNU$(3,5)="JUMBLES "
  21. MNU$(4,0)="NO "
  22. MNU$(4,1)="YES"
  23. MNU$(5,0)="SMALL"
  24. MNU$(5,1)="LARGE"
  25. MNU$(6,0)="NO "
  26. MNU$(6,1)="YES"
  27. Load "data/parent1.abk"
  28. Load "data/parent10.abk"
  29. Load "data/parent11.abk"
  30. Load "data/parent12.abk"
  31. Load "data/parent13.abk"
  32. Load "data/parent14.abk"
  33. TEACHER_SECTION:
  34. Hide On 
  35. Fade 3
  36. Wait 3*16
  37. Paper 0
  38. Clw 
  39. Screen Open 1,320,200,16,Lowres : MDE=0
  40. Curs Off : Scroll Off : Flash Off 
  41. Unpack 10
  42. Reserve Zone 32
  43. Pen 15
  44. Paper 7
  45. Locate 23,3 : Print MNU$(0,SOUND)
  46. Locate 23,5 : Print MNU$(1,LEVEL)
  47. Locate 23,7 : Print Str$(CPENALTY)-" "
  48. Locate 23,9 : Print MNU$(3,SECTION)
  49. Locate 23,11 : Print MNU$(4,VAR4)
  50. Locate 23,13 : Print MNU$(5,VAR5)
  51. Locate 23,15 : Print MNU$(6,CONCEAL)
  52. For I=0 To 6
  53.    Set Zone I+1,180,20+(I*16) To 294,32+(I*16)
  54. Next I
  55. Set Zone 8,28,132 To 156,149
  56. Set Zone 9,28,152 To 156,169
  57. Set Zone 10,28,172 To 156,189
  58. Set Zone 11,165,132 To 294,149
  59. Set Zone 12,165,152 To 294,169
  60. Set Zone 13,165,172 To 294,189
  61. Change Mouse 4
  62. Fade 3,$0,$F00,$F0,$FF0,$F,$F0F,$FFF,$AAA,$777,$F77,$7F7,$FF7,$77F,$F7F,$7FF,$FFF,,,,$FA0
  63. Wait 3*16
  64. Show On 
  65. TEACHER_LOOP:
  66. Clear Key 
  67. Repeat 
  68.    Wait Vbl 
  69.    ZN=Mouse Zone
  70.    MK=Mouse Key
  71.    K$=Lower$(Inkey$)
  72.    K=Scancode
  73. Until ZN<>0 or MK<>0 or K=$45
  74. If K=$45 or(MK and ZN=13)
  75.    Hide On 
  76.    DEMO_MESSAGE["Altering Defaults","This is a demo version of HENRIETTA's","BOOK of SPELLS.  Although you can","temporarily alter the settings in this","section they will be ignored by the","program."]
  77.    Fade 3
  78.    Wait 3*16
  79.    Paper 0
  80.    Clw 
  81.    CLEAR_BANKS
  82.    Gosub CLEAR_ARRAYS
  83.    X=Free
  84.    Run "game.amos"
  85. Else 
  86.    If(MK and ZN=10)
  87.       Hide On 
  88.       Gosub WRITE_DEFAULT_SETTINGS
  89.       Pen 15
  90.       Paper 7
  91.       Show On 
  92.    Else 
  93.       If(MK and ZN=3)
  94.          CPENALTY$=""
  95.          Goto TIME_PENALTY
  96.       Else 
  97.          If(MK and ZN=9)
  98.             Goto WORD_LIST_EDITOR
  99.          Else 
  100.             If(MK and ZN=12)
  101.                WRDLST=5
  102.                WRDTYP=0
  103.                Goto MAGIC_LIST
  104.             Else 
  105.                If(MK and ZN=8)
  106.                   Goto HELP_PARENT
  107.                Else 
  108.                   If(MK and ZN=11)
  109.                      Fade 3
  110.                      Wait 3*16
  111.                      Goto RESULT_VIEW
  112.                   End If 
  113.                End If 
  114.             End If 
  115.          End If 
  116.       End If 
  117.    End If 
  118. End If 
  119. If MK
  120.    If ZN=1
  121.       SOUND=SOUND xor 1
  122.       Wait Vbl 
  123.       Locate 23,3 : Print MNU$(0,SOUND)
  124.    Else 
  125.       If ZN=5
  126.          VAR4=VAR4 xor 1
  127.          Wait Vbl 
  128.          Locate 23,11 : Print MNU$(4,VAR4)
  129.       Else 
  130.          If ZN=6
  131.             VAR5=VAR5 xor 1
  132.             Wait Vbl 
  133.             Locate 23,13 : Print MNU$(5,VAR5)
  134.          Else 
  135.             If ZN=7
  136.                CONCEAL=CONCEAL xor 1
  137.                Wait Vbl 
  138.                Locate 23,15 : Print MNU$(6,CONCEAL)
  139.             Else 
  140.                If ZN=2
  141.                   LEVEL=LEVEL+1+(LEVEL=2)*3
  142.                   Wait Vbl 
  143.                   Locate 23,5 : Print MNU$(1,LEVEL)
  144.                Else 
  145.                   If ZN=4
  146.                      SECTION=SECTION+1+(SECTION=5)*6
  147.                      Wait Vbl 
  148.                      Locate 23,9 : Print MNU$(3,SECTION)
  149.                   End If 
  150.                End If 
  151.             End If 
  152.          End If 
  153.       End If 
  154.    End If 
  155. End If 
  156. If MK and(ZN>=1 and ZN<=7) Then Repeat : Until Mouse Key=0
  157. Goto TEACHER_LOOP
  158. TIME_PENALTY:
  159. Locate 23,7 : Print CPENALTY$-" ";"_ "
  160. Clear Key 
  161. Repeat 
  162.    K$=Lower$(Inkey$)
  163. Until K$<>"" or K<>0
  164. If((K$>="0") and(K$<="9") and Len(CPENALTY$)<2)
  165.    CPENALTY$=CPENALTY$+K$
  166. Else 
  167.    If((K$=Chr$(13)) and(CPENALTY$=""))
  168.       Goto TIME_EXIT
  169.    Else 
  170.       If((K$=Chr$(13)) and(CPENALTY$<>""))
  171.          CPENALTY=Val(CPENALTY$)
  172.          Goto TIME_EXIT
  173.       Else 
  174.          If((K$=Chr$(8)) and(CPENALTY$<>""))
  175.             CPENALTY$=Left$(CPENALTY$,Len(CPENALTY$)-1)
  176.          End If 
  177.       End If 
  178.    End If 
  179. End If 
  180. Goto TIME_PENALTY
  181. TIME_EXIT:
  182. If CPENALTY>50 Then CPENALTY=50
  183. Locate 23,7 : Print Str$(CPENALTY)-" ";"  "
  184. Goto TEACHER_LOOP
  185. WORD_LIST_EDITOR:
  186. Hide On 
  187. Fade 3
  188. Wait 3*16
  189. Paper 0
  190. Clw 
  191. Screen Open 1,640,200,4,Hires : MDE=1
  192. Reserve Zone 64
  193. Curs Off 
  194. Scroll Off 
  195. Flash Off 
  196. Unpack 11
  197. Colour 19,0
  198. Fade 3,$0,$FFF,$AAA,$666,,,,,,,,,,,,,,,,$FA0
  199. Wait 3*16
  200. Show On 
  201. Z=1
  202. For X=0 To 1
  203.    For Y=0 To 4
  204.       Set Zone Z,52+(X*271),62+(Y*24) To 319+(X*271),82+(Y*24)
  205.       Inc Z
  206.    Next Y
  207. Next X
  208. 4180
  209. Repeat 
  210.    ZN=Mouse Zone
  211.    K$=Lower$(Inkey$)
  212.    K=Scancode
  213. Until(Mouse Key<>0 and ZN<>0) or K=$45
  214. Hide On 
  215. If K=$45
  216.    Goto TEACHER_SECTION
  217. Else 
  218.    If(ZN>=1 and ZN<=5)
  219.       WRDLST=ZN-1
  220.       WRDTYP=0
  221.    Else 
  222.       WRDLST=ZN-6 : WRDTYP=1
  223.    End If 
  224. End If 
  225. For I=0 To 500
  226.    WRD$(I)=""
  227.    TEMP$(I)=""
  228. Next I
  229. If WRDLST<>5
  230.    For I=0 To 500
  231.       WRD$(I)=""
  232.       TEMP$(I)=""
  233.    Next I
  234.    If WRDTYP=0
  235.       WORDS=50
  236.    Else 
  237.       WORDS=500
  238.    End If 
  239.    On Error Goto DISK_READ_ERROR_HIRES
  240.    Load "data/"+MNU$(5,WRDTYP)+Str$(WRDLST+5)-" "+".abk",15
  241.    On Error Goto BBER
  242.    WRDBASE=Start(15)-1
  243.    T0TWRD=0
  244.    Repeat 
  245.       For I=1 To WRDLST+5
  246.          WRD$(T0TWRD)=WRD$(T0TWRD)+Chr$(Peek(WRDBASE+I))
  247.       Next I
  248.       Inc T0TWRD
  249.       WRDBASE=WRDBASE+WRDLST+5
  250.    Until T0TWRD=WORDS
  251.    Dec T0TWRD
  252.    Erase 15
  253. End If 
  254. MAGIC_LIST:
  255. If WRDLST=5
  256.    For I=0 To 500
  257.       MAGWRD$(I)=""
  258.       TEMP$=""
  259.    Next I
  260.    On Error Goto DISK_READ_ERROR_HIRES
  261.    Load "data/magic5.abk",15
  262.    On Error Goto BBER
  263.    WRDBASE=Start(15)-1
  264.    T0TWRD=0
  265.    Repeat 
  266.       For I=1 To 5
  267.          MAGWRD$(T0TWRD)=MAGWRD$(T0TWRD)+Chr$(Peek(WRDBASE+I))
  268.       Next I
  269.       Inc T0TWRD
  270.       WRDBASE=WRDBASE+5
  271.    Until T0TWRD=50
  272.    Dec T0TWRD
  273.    Erase 15
  274. End If 
  275. For I=0 To 500
  276.    TEMP$(I)=""
  277. Next I
  278. If WRDLST<>5
  279.    For I=0 To 500
  280.       TEMP$(I)=WRD$(I)
  281.    Next I
  282. End If 
  283. If WRDLST=5
  284.    For I=0 To 500
  285.       TEMP$(I)=MAGWRD$(I)
  286.    Next I
  287. End If 
  288. WORD_EDIT_SCREEN:
  289. Fade 3
  290. Wait 3*16
  291. Paper 0
  292. Clw 
  293. Screen Open 1,640,200,4,Hires : MDE=1
  294. Reserve Zone 64
  295. Flash Off 
  296. Curs Off 
  297. Scroll Off 
  298. Hide On 
  299. Z=1
  300. For X=0 To 4
  301.    Set Zone Z,32+(X*120),139 To 122+(X*120),159
  302.    Inc Z
  303. Next X
  304. Set Zone 6,396,166 To 486,185
  305. Set Zone 7,517,166 To 607,185
  306. CX=0
  307. CY=0
  308. CP=0
  309. Screen Open 2,640,200,4,Hires
  310. Curs Off 
  311. Flash Off 
  312. Scroll Off 
  313. Unpack 12 To 2
  314. Screen To Front 1
  315. Screen 2
  316. Curs Off 
  317. Hide On 
  318. Pen 0
  319. Paper 2
  320. Locate 6,4 : Print ">"
  321. Locate 16,4 : Print "<"
  322. If WRDLST=5 and WRDTYP=0 Then Ink 2 : Bar 268,139 To 364,159
  323. If WRDTYP=0 Then Ink 2 : Bar 26,139 To 241,159
  324. REENTRY_WORD_EDIT:
  325. For I=0 To 500
  326.    TEMP$(I)=""
  327. Next I
  328. If WRDLST<>5
  329.    For I=0 To 500
  330.       TEMP$(I)=WRD$(I)
  331.    Next I
  332.    TEMP$(500)=""
  333.    Sort TEMP$(0)
  334.    If WRDTYP=0
  335.       P=1
  336.       For I=451 To 500
  337.          TEMP$(P)=TEMP$(I)
  338.          TEMP$(I)=""
  339.          Inc P
  340.       Next I
  341.    End If 
  342.    For I=1 To 500
  343.       WRD$(I-1)=TEMP$(I)
  344.    Next I
  345. End If 
  346. If WRDLST=5
  347.    For I=0 To 500
  348.       TEMP$(I)=MAGWRD$(I)
  349.    Next I
  350.    TEMP$(500)=""
  351.    Sort TEMP$(0)
  352.    If WRDTYP=0
  353.       P=1
  354.       For I=451 To 500
  355.          TEMP$(P)=TEMP$(I)
  356.          Inc P
  357.       Next I
  358.    End If 
  359.    For I=1 To 500
  360.       MAGWRD$(I-1)=TEMP$(I)
  361.    Next I
  362. End If 
  363. RESTART_WORD_EDIT:
  364. WRDPGE=0
  365. Screen 2
  366. Gosub PAGE_DISPLAY
  367. DISPLAY_WORDS
  368. WORD_EDIT_LOOP:
  369. If WRDLST<>5
  370.    Screen 1
  371.    Pen 0
  372.    Paper 2
  373.    Locate 3,23 : Print "Page";WRDPGE+1;" of";1-(WRDTYP=1)*9;"  "
  374.    Locate 7+CX*14,4+CY
  375.    Print WRD$(CP+(WRDPGE*50));Space$(9-Len(WRD$(CP+(WRDPGE*50))))
  376.    Show On 
  377.    Clear Key 
  378.    Repeat 
  379.       ZN=Mouse Zone : MK=Mouse Key : K$=Lower$(Inkey$) : K=Scancode
  380.    Until(MK<>0 or(K$<>"") or K<>0)
  381. End If 
  382. If WRDLST=5
  383.    Screen 1
  384.    Pen 0
  385.    Paper 2
  386.    Locate 3,23 : Print "Page";WRDPGE+1;" of";1-(WRDTYP=1)*9;"  "
  387.    Locate 7+CX*14,4+CY
  388.    Print MAGWRD$(CP+(WRDPGE*50));Space$(9-Len(MAGWRD$(CP+(WRDPGE*50))))
  389.    Show On 
  390.    Clear Key 
  391.    Repeat 
  392.       ZN=Mouse Zone
  393.       MK=Mouse Key
  394.       K$=Lower$(Inkey$)
  395.       K=Scancode
  396.    Until(MK<>0 or(K$<>"") or K<>0)
  397. End If 
  398. If(MK and ZN=1)
  399.    Goto PAGE_NEXT
  400. Else 
  401.    If(MK and ZN=2)
  402.       Goto PAGE_BEFORE
  403.    Else 
  404.       If(MK and ZN=3)
  405.          Goto WORD_LOAD
  406.       Else 
  407.          If(MK and ZN=4)
  408.             Goto WORD_SAVE
  409.          Else 
  410.             If(MK and ZN=5)
  411.                Goto WORD_LIST_PRINT
  412.             Else 
  413.                If(MK and ZN=6)
  414.                   Goto WORD_LIST_HELP
  415.                Else 
  416.                   If(MK and ZN=7) or K=$45
  417.                      Screen Close 2
  418.                      Goto TEACHER_SECTION
  419.                   End If 
  420.                End If 
  421.             End If 
  422.          End If 
  423.       End If 
  424.    End If 
  425. End If 
  426. Screen 1
  427. If K=$4C
  428.    Gosub NOISE_BELL
  429.    Pen 0
  430.    Paper 2
  431.    Locate 6+CX*14,4+CY : Print " "
  432.    Locate 16+CX*14,4+CY : Print " "
  433.    Dec CP : Dec CY
  434.    If CY<0
  435.       CY=9
  436.       Dec CX
  437.       If CX<0
  438.          CX=4 : CP=49
  439.       End If 
  440.    End If 
  441. End If 
  442. If K=$4D
  443.    Gosub NOISE_BELL
  444.    Pen 0
  445.    Paper 2
  446.    Locate 6+CX*14,4+CY : Print " "
  447.    Locate 16+CX*14,4+CY : Print " "
  448.    Inc CP : Inc CY
  449.    If CY>9
  450.       CY=0 : Inc CX
  451.       If CX>4
  452.          CX=0 : CP=0
  453.       End If 
  454.    End If 
  455. End If 
  456. If K=$4E
  457.    Gosub NOISE_BELL
  458.    Pen 0
  459.    Paper 2
  460.    Locate 6+CX*14,4+CY : Print " "
  461.    Locate 16+CX*14,4+CY : Print " "
  462.    CP=CP+10 : Inc CX
  463.    If CX>4
  464.       CX=0 : CP=CP-49 : Inc CY
  465.       If CY>9
  466.          CY=0 : CP=0
  467.       End If 
  468.    End If 
  469. End If 
  470. If K=$4F
  471.    Gosub NOISE_BELL
  472.    Pen 0
  473.    Paper 2
  474.    Locate 6+CX*14,4+CY : Print " "
  475.    Locate 16+CX*14,4+CY : Print " "
  476.    CP=CP-10 : Dec CX
  477.    If CX<0
  478.       CX=4 : CP=CP+49 : Dec CY
  479.       If CY<0
  480.          CY=9 : CP=49
  481.       End If 
  482.    End If 
  483. End If 
  484. Pen 0
  485. Paper 2
  486. Locate 6+CX*14,4+CY
  487. Print ">"
  488. Locate 16+CX*14,4+CY
  489. Print "<"
  490. If(K$=Chr$(13)) or((K$>="a") and(K$<="z"))
  491.    Gosub NOISE_BELL
  492.    Goto WORD_EDIT
  493. End If 
  494. Goto WORD_EDIT_LOOP
  495. Procedure DISPLAY_WORDS
  496.    Screen Copy 2 To 1
  497.    Screen To Front 1
  498.    Screen 1
  499.    Curs Off 
  500.    Fade 3,$0,$FFF,$AAA,$666
  501.    Wait 3*16
  502. End Proc
  503. WORD_EDIT:
  504. Screen 1
  505. If((K$>="a") and(K$<="z"))
  506.    TEMP$=K$
  507. Else 
  508.    TEMP$=""
  509. End If 
  510. If WRDLST<>5
  511.    OLDWRD$=""
  512.    For I=1 To WRDLST+5
  513.       OLDWRD$=OLDWRD$+Mid$(WRD$(CP+(WRDPGE*50)),I,1)
  514.    Next I
  515.    Pen 0
  516.    Paper 2
  517. End If 
  518. If WRDLST=5
  519.    OLDWRD$=""
  520.    For I=1 To WRDLST+5
  521.       OLDWRD$=OLDWRD$+Mid$(MAGWRD$(CP+(WRDPGE*50)),I,1)
  522.    Next I
  523.    Pen 0
  524.    Paper 2
  525. End If 
  526. WORD_LOOP:
  527. Locate 7+CX*14,4+CY
  528. If Len(TEMP$)<9
  529.    Print TEMP$;"_";Space$(9-Len(TEMP$)-1)
  530. Else 
  531.    Print TEMP$;Space$(9-Len(TEMP$))
  532. End If 
  533. If WRDLST<>5
  534.    Hide On 
  535.    Clear Key 
  536.    Repeat 
  537.       MK=Mouse Key
  538.       K$=Lower$(Inkey$)
  539.       K=Scancode
  540.    Until(MK<>0 or(K$<>"") or K<>0)
  541.    If((K$>="a") and(K$<="z") and Len(TEMP$)<WRDLST+5+(WRDLST=5)*5)
  542.       Gosub NOISE_BELL
  543.       TEMP$=TEMP$+K$
  544.    Else 
  545.       If((K=$41) and(TEMP$<>""))
  546.          Gosub NOISE_BELL
  547.          TEMP$=Left$(TEMP$,Len(TEMP$)-1)
  548.       Else 
  549.          If((K$=Chr$(13)) and(TEMP$=""))
  550.             WRD$(CP+(WRDPGE*50))=OLDWRD$
  551.             Goto WORD_EDIT_LOOP
  552.          Else 
  553.             If(K$=Chr$(13) and Len(TEMP$)=5-(WRDLST<>5)*WRDLST)
  554.                WRD$(CP+(WRDPGE*50))=TEMP$
  555.                Goto WORD_EDIT_LOOP
  556.             End If 
  557.          End If 
  558.       End If 
  559.    End If 
  560. End If 
  561. If WRDLST=5
  562.    Hide On 
  563.    Clear Key 
  564.    Repeat 
  565.       MK=Mouse Key
  566.       K$=Lower$(Inkey$)
  567.       K=Scancode
  568.    Until(MK<>0 or(K$<>"") or K<>0)
  569.    If((K$>="a") and(K$<="z") and Len(TEMP$)<WRDLST+5+(WRDLST=5)*5)
  570.       Gosub NOISE_BELL
  571.       TEMP$=TEMP$+K$
  572.    Else 
  573.       If((K=$41) and(TEMP$<>""))
  574.          Gosub NOISE_BELL
  575.          TEMP$=Left$(TEMP$,Len(TEMP$)-1)
  576.       Else 
  577.          If((K$=Chr$(13)) and(TEMP$=""))
  578.             MAGWRD$(CP+(WRDPGE*50))=OLDWRD$
  579.             Goto WORD_EDIT_LOOP
  580.          Else 
  581.             If(K$=Chr$(13) and Len(TEMP$)=5-(WRDLST<>5)*WRDLST)
  582.                MAGWRD$(CP+(WRDPGE*50))=TEMP$
  583.                Goto WORD_EDIT_LOOP
  584.             End If 
  585.          End If 
  586.       End If 
  587.    End If 
  588. End If 
  589. Goto WORD_LOOP
  590. PAGE_NEXT:
  591. If WRDTYP=1
  592.    Inc WRDPGE
  593.    If WRDPGE>9
  594.       WRDPGE=0
  595.    End If 
  596.    Gosub PAGE_DISPLAY
  597. End If 
  598. Goto WORD_EDIT_LOOP
  599. PAGE_BEFORE:
  600. If WRDTYP=1
  601.    Dec WRDPGE
  602.    If WRDPGE<0
  603.       WRDPGE=9
  604.    End If 
  605.    Gosub PAGE_DISPLAY
  606. End If 
  607. Goto WORD_EDIT_LOOP
  608. WORD_LOAD:
  609. Screen Close 2
  610. If WRDLST=5
  611.    Goto RESTART_WORD_EDIT
  612. Else 
  613.    Goto WORD_LIST_EDITOR
  614. End If 
  615. WORD_SAVE:
  616. DEMO_MESSAGE["Saving Words","This is a demo version and it is not","possible to save new word lists.","","",""]
  617. If WRDLST=5
  618.   Screen Close 2
  619.   Goto TEACHER_SECTION
  620. Else 
  621.   Goto REENTRY_WORD_EDIT
  622. End If 
  623. PAGE_DISPLAY:
  624. If WRDLST<>5
  625.    P=0
  626.    For X=0 To 4
  627.       For Y=0 To 9
  628.          Locate 7+X*14,4+Y
  629.          Pen 0 : Paper 2
  630.          Print WRD$(P+(WRDPGE*50))
  631.          Inc P
  632.       Next Y
  633.    Next X
  634. End If 
  635. If WRDLST=5
  636.    P=0
  637.    For X=0 To 4
  638.       For Y=0 To 9
  639.          Locate 7+X*14,4+Y
  640.          Pen 0 : Paper 2
  641.          Print MAGWRD$(P+(WRDPGE*50))
  642.          Inc P
  643.       Next Y
  644.    Next X
  645. End If 
  646. Return 
  647. HELP_PARENT:
  648. Fade 3
  649. Wait 3*16
  650. Paper 0
  651. Clw 
  652. Hide On 
  653. Screen Open 1,640,200,4,Hires : MDE=1
  654. Reserve Zone 64
  655. Flash Off 
  656. Curs Off 
  657. Scroll Off 
  658. Set Zone 1,22,176 To 112,195
  659. Set Zone 2,142,176 To 232,195
  660. Set Zone 3,490,176 To 616,195
  661. Pen 0
  662. Paper 3
  663. HLPPGE=0
  664. Unpack 14
  665. Paper 1
  666. Locate 2,0 : Print " HELP - Parent/Teacher Section "
  667. Paper 3
  668. Pen 1
  669. Curs Off 
  670. Fade 3,$0,$FFF,$AAA,$222
  671. Wait 3*16
  672. Show On 
  673. HELP_PARENT_LOOP:
  674. If HLPPGE=0
  675.    CLEAR_HELP_WINDOW
  676.    Locate 2,2 : Print "An important feature of this program is the ease";
  677.    Locate 2,3 : Print "with which it can be configured to suit any user.";
  678.    Locate 2,5 : Print "There are seven different options which can be changed (see below).";
  679.    Locate 2,6 : Print "The current settings are to the right of the screen. To change these";
  680.    Locate 2,7 : Print "settings, simply point to them and click the left mouse button.";
  681.    Locate 2,10 : Print "The options are:";
  682.    Locate 2,12 : Inverse On : Print " Sound [ON/OFF] "; : Inverse Off 
  683.    Locate 2,13 : Print "Determines whether the various sound effects used throughout the";
  684.    Locate 2,14 : Print "program are on/off."; : Inverse On 
  685.    Locate 2,16 : Print " Difficulty [LOW/MEDIUM/HIGH] "; : Inverse Off 
  686.    Locate 2,17 : Print "Sets general level of question difficulty.";
  687.    Locate 2,19 : Inverse On : Print " Clue penalty [0-50] "; : Inverse Off 
  688.    Locate 2,20 : Print "Determines the penalty (in seconds) to be added each time the";
  689. End If 
  690. If HLPPGE=1
  691.    CLEAR_HELP_WINDOW
  692.    Locate 2,2 : Print "student asks for a clue.";
  693.    Locate 2,4 : Inverse On 
  694.    Print " Sections [ALL/FLASH/COMPLETE/CRACK-IT/HANG-UP/JUMBLES] ";
  695.    Inverse Off 
  696.    Locate 2,5 : Print "Choose questions the program is to ask.";
  697.    Locate 2,7 : Inverse On : Print " Record results [YES/NO] "; : Inverse Off 
  698.    Locate 2,8 : Print "Determines whether or not the student's results will be recorded.";
  699.    Locate 2,10 : Inverse On : Print " Hide this section [YES/NO] "; : Inverse Off 
  700.    Locate 2,11 : Print "Determines whether or not the access instructions on the Control";
  701.    Locate 2,12 : Print "Screen are displayed.";
  702.    Locate 2,14 : Inverse On : Print " Size of word list [LARGE/SMALL] "; : Inverse Off 
  703.    Locate 2,15 : Print "You can access two lists, small (up to 50 words for each word size)";
  704.    Locate 2,16 : Print "large (up to 500 words for each word size).  This option determines";
  705.    Locate 2,17 : Print "which will be used.";
  706. End If 
  707. If HLPPGE=2
  708.    CLEAR_HELP_WINDOW
  709.    Locate 2,2 : Print "There are six buttons at the bottom of the screen which allow you to"
  710.    Locate 2,3 : Print "carry out various operations.  To select an operation simply point to it";
  711.    Locate 2,4 : Print "and click the left mouse button.";
  712.    Locate 2,6 : Inverse On : Print " HELP "; : Inverse Off : 
  713.    Locate 2,7 : Print "Displays these help pages.";
  714.    Locate 2,9 : Inverse On : Print " View results "; : Inverse Off 
  715.    Locate 2,10 : Print "Details of the last ten sets of recorded results can be viewed and";
  716.    Locate 2,11 : Print "printed from here.  For further help on 'View results', click on the";
  717.    Locate 2,12 : Print "'View results' button then click on the 'Help' button.";
  718.    Locate 2,14 : Inverse On : Print " Edit word lists "; : Inverse Off 
  719.    Locate 2,15 : Print "Changes all or any of the words from 5 to 9 letters inclusive.  Words are";
  720.    Locate 2,16 : Print "automatically rearranged in alphabetical order when you have finished.";
  721.    Locate 2,18 : Inverse On : Print " Edit magic words "; : Inverse Off 
  722.    Locate 2,19 : Print "Changes all or any of the magic words which are";
  723.    Locate 2,20 : Print "automatically rearranged in alphabetical order when you have finished.";
  724. End If 
  725. If HLPPGE=3
  726.    CLEAR_HELP_WINDOW
  727.    Inverse On 
  728.    Locate 2,2 : Print " Save defaults ";
  729.    Inverse Off 
  730.    Locate 2,3 : Print "Saves the current settings as new defaults.";
  731.    Inverse On 
  732.    Locate 2,5 : Print " Quit "
  733.    Inverse Off 
  734.    Locate 2,6 : Print "Leave Parent/Teacher section.";
  735. End If 
  736. HELP_PARENT_INPUT:
  737. Clear Key 
  738. Repeat 
  739.    MK=Mouse Key
  740.    K$=Lower$(Inkey$)
  741.    K=Scancode
  742. Until(MK<>0 or K<>0)
  743. ZN=Mouse Zone
  744. If((MK and ZN=3) or K=$45)
  745.    Fade 3
  746.    Wait 3*16
  747.    Paper 0
  748.    Clw 
  749.    Goto TEACHER_SECTION
  750. Else 
  751.    If((MK and ZN=1) or(K$=" ") or K=$4D)
  752.       HLPPGE=HLPPGE+1+(HLPPGE=3)*4
  753.       Goto HELP_PARENT_LOOP
  754.    Else 
  755.       If((MK and ZN=2) or K=$4C)
  756.          HLPPGE=HLPPGE-1-(HLPPGE=0)*4 : 
  757.          Goto HELP_PARENT_LOOP
  758.       Else 
  759.          Goto HELP_PARENT_INPUT
  760.       End If 
  761.    End If 
  762. End If 
  763. RESULT_VIEW:
  764. Paper 0
  765. Clw 
  766. Screen Open 1,640,200,4,Hires
  767. Hide On 
  768. Palette $0,$FFF,$F0,$F00
  769. MDE=1
  770. Curs Off : Flash Off : Scroll Off 
  771. Cls 0
  772. Reserve Zone 64
  773. RESULT_SET=9
  774. Set Zone 1,19,181 To 120,195
  775. Set Zone 2,127,181 To 230,195
  776. Set Zone 3,236,181 To 336,195
  777. Set Zone 4,344,181 To 447,195
  778. Set Zone 5,507,181 To 558,195
  779. Set Zone 6,566,181 To 620,195
  780. Set Zone 7,454,181 To 500,195
  781. RESULT_LOAD:
  782. Hide On 
  783. Pen 1
  784. Paper 0
  785. Locate 0,10
  786. Centre Space$(34)
  787. Cdown 
  788. Centre "  Loading results - Please wait   "
  789. Cdown 
  790. Centre Space$(34)
  791. Ink 1
  792. Box 187,82 To 453,101
  793. RESULT_ERROR_RESUME:
  794. RESULT_GAME=1
  795. On Error Goto CREATE_NEW_RESULTS
  796. Open In 1,"DATA/RESULTS"+Str$(RESULT_SET)-" "+".DAT"
  797. Input #1,DIF$
  798. Input #1,NAM$
  799. Input #1,DAT$
  800. Input #1,SECT
  801. Input #1,WLEN
  802. For G=1 To 5
  803.    Input #1,QUESTION(G)
  804.    I=0
  805.    For A=0 To 7
  806.       Input #1,RESULT$(G,I)
  807.       Input #1,RESULT$(G,I+1)
  808.       Input #1,RESULT$(G,I+2)
  809.       Input #1,RESULT$(G,I+3)
  810.       Input #1,RESULT$(G,I+4)
  811.       Input #1,RESULT$(G,I+5)
  812.       I=I+6
  813.    Next A
  814. Next G
  815. Close 1
  816. On Error Goto BBER
  817. RESULT_LOOP:
  818. Screen Open 2,640,200,4,Hires
  819. Curs Off : Scroll Off : Flash Off 
  820. Unpack 13 To 2
  821. Screen To Front 1
  822. Screen 2
  823. Curs Off 
  824. Pen 0
  825. Paper 1
  826. Locate 3,1 : Print "Diff:";
  827. Pen 1
  828. Paper 2
  829. Print " ";DIF$;" "
  830. Pen 0
  831. Paper 1
  832. Locate 69,1 : Print "Set:";
  833. Pen 1
  834. Paper 2
  835. Print Using " ## ";RESULT_SET+1
  836. A$="Results: "+NAM$+"  Date:  "+DAT$
  837. Pen 1
  838. Paper 0
  839. Locate 42-(Len(A$)/2),1 : Print A$
  840. Paper 3
  841. Locate 16,3 : Print Str$(WLEN);" "
  842. Locate 73,3
  843. If QUESTION(RESULT_GAME)<8
  844.    Print "  0 "
  845. Else 
  846.    Print Using " ## ";QUESTION(RESULT_GAME)-9
  847. End If 
  848. Pen 0
  849. Paper 1
  850. ITEM$(1)="Flash     "
  851. ITEM$(2)="Complete  "
  852. ITEM$(3)="Crack-It  "
  853. ITEM$(4)="Hang-Up   "
  854. ITEM$(5)="Jumbles   "
  855. If SECT<>0
  856.    For I=1 To 5
  857.       ITEM$(I)=Left$(ITEM$(SECT),9)+Str$(I)-" "
  858.    Next I
  859. End If 
  860. Pen 1
  861. Paper 0
  862. If((RESULT_GAME=1 or RESULT_GAME=2) and SECT=0) or(SECT=1 or SECT=2)
  863.    Locate 2,5
  864.    Print " Target word         Try 1          Try 2           Try 3            Clues  "
  865.    AX1=25
  866.    AX2=40
  867.    AX3=56
  868. End If 
  869. If(RESULT_GAME=3 and SECT=0) or SECT=3
  870.    Ink 0
  871.    Draw 30*8,33 To 30*8,178
  872.    Locate 2,5
  873.    Print " Target word   Coded word       Try 1       Try 2       Try 3        Clues  "
  874.    AX1=36
  875.    AX2=48
  876.    AX3=60
  877. End If 
  878. If(RESULT_GAME=4 and SECT=0) or SECT=4
  879.    Ink 0
  880.    Draw 320,33 To 320,178
  881.    Locate 2,5
  882.    Print " Target word       Letters tried              Answered OK            Clues  "
  883.    AX1=27
  884.    AX2=53
  885.    AX3=-1
  886. End If 
  887. If(RESULT_GAME=5 and SECT=0) or SECT=5
  888.    Ink 0
  889.    Draw 30*8,33 To 30*8,178
  890.    Locate 2,5
  891.    Print " Target word   Jumbled word     Try 1       Try 2       Try 3        Clues  "
  892.    AX1=36
  893.    AX2=48
  894.    AX3=60
  895. End If 
  896. Pen 1
  897. Paper 3
  898. Locate 37,3 : Print " ";ITEM$(RESULT_GAME);" "
  899. Pen 0
  900. Paper 1
  901. X=0
  902. For I=0 To 7
  903.    Locate 3,7+(I*2)
  904.    Print RESULT$(RESULT_GAME,X)
  905.    If(RESULT$(RESULT_GAME,X+1)="") and(RESULT$(RESULT_GAME,X+2)="Not attempted")
  906.       Locate 0-((AX2<>-1)*AX2)-((AX2=-1)*AX1)-7,7+(I*2)
  907.       Pen 1 : Paper 3
  908.       Print " Not attempted "
  909.       Pen 0 : Paper 1
  910.       Goto 5090
  911.    End If 
  912.    If AX1<>-1 and((RESULT_GAME<>4 and SECT=0) or SECT<>4)
  913.       A$=RESULT$(RESULT_GAME,X+1)
  914.       Locate AX1-(Len(A$)/2),7+(I*2)
  915.       If A$="OK"
  916.          Pen 2
  917.          Paper 1
  918.          Print A$
  919.          Goto 5080
  920.       Else 
  921.          Pen 3
  922.          Paper 1
  923.          Print A$
  924.       End If 
  925.    End If 
  926.    If AX1<>-1 and((RESULT_GAME=4 and SECT=0) or SECT=4)
  927.       A$=RESULT$(RESULT_GAME,X)
  928.       B$=RESULT$(RESULT_GAME,X+1)
  929.       Locate AX1-(Len(B$)/2),7+(I*2)
  930.       Gosub 5150
  931.    End If 
  932.    If AX2<>-1
  933.       A$=RESULT$(RESULT_GAME,X+2)
  934.       Locate AX2-(Len(A$)/2),7+(I*2)
  935.       If A$="OK"
  936.          Pen 2
  937.          Paper 1
  938.          Print A$
  939.       Else 
  940.          Pen 3
  941.          Paper 1
  942.          Print A$
  943.       End If 
  944.    End If 
  945.    If AX3<>-1
  946.       A$=RESULT$(RESULT_GAME,X+3)
  947.       Locate AX3-(Len(A$)/2),7+(I*2)
  948.       If A$="OK"
  949.          Pen 2
  950.          Paper 1
  951.          Print A$
  952.       Else 
  953.          Pen 3
  954.          Paper 1
  955.          Print A$
  956.       End If 
  957.    End If 
  958.    5080
  959.    Pen 0
  960.    Paper 1
  961.    5090
  962.    Locate 73,7+(I*2)
  963.    Print RESULT$(RESULT_GAME,4+X)
  964.    If(RESULT_GAME=5 and SECT=0) or(RESULT_GAME=3 and SECT=0) or SECT=3 or SECT=5
  965.       Locate 16,7+(I*2)
  966.       Print RESULT$(RESULT_GAME,5+X)
  967.    End If 
  968.    X=X+6
  969. Next I
  970. 5110
  971. Show On 
  972. Screen Copy 2 To 1
  973. Screen To Front 1
  974. Screen 1
  975. Clear Key 
  976. Repeat 
  977.    K$=Lower$(Inkey$)
  978.    K=Scancode
  979.    MK=Mouse Key
  980. Until(K$<>"" or K<>0 or MK<>0)
  981. ZN=Mouse Zone
  982. If(K$>="1") and(K$<="9")
  983.    RESULT_SET=Val(K$)-1
  984.    Goto RESULT_LOAD
  985. Else 
  986.    If K$="0"
  987.       RESULT_SET=9
  988.       Goto RESULT_LOAD
  989.    End If 
  990. End If 
  991. If(MK and ZN=6) or K=$45
  992.    Fade 3
  993.    Wait 3*16
  994.    Screen Close 2
  995.    Goto TEACHER_SECTION
  996. Else 
  997.    If(MK and ZN=2)
  998.       RESULT_SET=RESULT_SET+1+(RESULT_SET=9)*10
  999.       Goto RESULT_LOAD
  1000.    Else 
  1001.       If(MK and ZN=1)
  1002.          RESULT_SET=RESULT_SET-1-(RESULT_SET=0)*10
  1003.          Goto RESULT_LOAD
  1004.       Else 
  1005.          If(MK and ZN=4)
  1006.             RESULT_GAME=RESULT_GAME+1+(RESULT_GAME=5)*5
  1007.             Goto RESULT_LOOP
  1008.          Else 
  1009.             If(MK and ZN=3)
  1010.                RESULT_GAME=RESULT_GAME-1-(RESULT_GAME=1)*5
  1011.                Goto RESULT_LOOP
  1012.             Else 
  1013.                If(MK and ZN=5)
  1014.                   Goto RESULT_PRINT
  1015.                Else 
  1016.                   If(MK and ZN=7)
  1017.                      Goto RESULTS_HELP
  1018.                   End If 
  1019.                End If 
  1020.             End If 
  1021.          End If 
  1022.       End If 
  1023.    End If 
  1024. End If 
  1025. Goto 5110
  1026. 5150
  1027. For III=1 To Len(B$)
  1028.    If Instr(A$,Mid$(B$,III,1))=0 Then Pen 3 Else Pen 2
  1029.    Paper 1
  1030.    Print Mid$(B$,III,1);
  1031. Next III
  1032. Return 
  1033. WORD_LIST_HELP:
  1034. Hide On 
  1035. Get Block 1,80,40,480,128
  1036. Screen 2
  1037. Ink 0
  1038. Bar 88,48 To 544,136
  1039. Pen 1
  1040. Paper 0
  1041. Inverse On : Locate 16,5 : Print " HELP "
  1042. Inverse Off : Locate 13,7 : Print "Use the cursor keys to move from word to word."
  1043. Locate 13,8 : Print "Press <Enter> to edit the current word."
  1044. Locate 13,10 : Print "Use the buttons at the bottom of the screen to look"
  1045. Locate 13,11 : Print "at other parts of the Word List; to print the current"
  1046. Locate 13,12 : Print "Word List; to save the current Word List; to load a"
  1047. Locate 13,13 : Print "new Word List; or to leave the Word List Editor."
  1048. Locate 13,15 : Print "Press <F1> or <Esc> to leave HELP"
  1049. Wait Vbl 
  1050. Screen Copy 2,96,40,544,168 To 1,96,40
  1051. Clear Key 
  1052. Repeat 
  1053.    K$=Lower$(Inkey$) : K=Scancode
  1054. Until K=$45 or K=$50
  1055. Wait Vbl 
  1056. Put Block 1
  1057. Screen 1
  1058. Wait Vbl 
  1059. Put Block 1
  1060. Del Block 1
  1061. Goto WORD_EDIT_LOOP
  1062. WORD_LIST_PRINT:
  1063. DEMO_MESSAGE["Printing Word Lists","This is a demo version and there","are no printing facilities available.","","",""]
  1064. Goto WORD_EDIT_LOOP
  1065. RESULTS_HELP:
  1066. Hide On 
  1067. Screen 2
  1068. Pen 1
  1069. Paper 0
  1070. Clw 
  1071. Ink 2
  1072. Box 0,0 To 79*8,24*8
  1073. Paper 2
  1074. Locate 2,0 : Print " Key to results table - ";Left$(ITEM$(RESULT_GAME),8)-" ";" "
  1075. Paper 3
  1076. Locate 0,24 : Centre " Press <F1> or <Esc> to leave HELP "
  1077. Paper 0
  1078. Locate 2,2 : Print "a - Question difficulty;"
  1079. Locate 2,3 : Print "b - Student's name and date exercise"
  1080. Locate 6,4 : Print "completed  (As set by"
  1081. Locate 6,5 : Print "the user);"
  1082. Locate 2,6 : Print "c - Set of results being viewed.  The"
  1083. Locate 6,7 : Print "last ten sets are stored on disc;"
  1084. Locate 2,8 : Print "d - The length of words used during"
  1085. Locate 6,9 : Print "exercise;"
  1086. Locate 2,10 : Print "e - Name of exercise;"
  1087. Locate 2,11 : Print "f - The number of extra questions asked.  To successfully complete an"
  1088. Locate 6,12 : Print "exercise, eight questions must be answered correctly.  If more than"
  1089. Locate 6,13 : Print "eight are required, the number of extra questions posed is shown here;"
  1090. Locate 2,14 : Print "g - The correct answer;"
  1091. If((RESULT_GAME=1 or RESULT_GAME=2) and SECT=0) or SECT=1 or SECT=2
  1092.    Locate 2,15
  1093.    Print "h - The actual answer given by the student or OK if the answer is correct."
  1094.    Locate 6,16 : Print "'Not attempted' means <Esc> was pressed before this question was"
  1095.    Locate 6,17 : Print "reached, or that the exercise was not attempted;"
  1096.    Locate 2,18 : Print "i - Number of clues requested;"
  1097.    Locate 2,19 : Print "j - There are seven buttons on the screen.  These allow you to navigate"
  1098.    Locate 6,20 : Print "through the results, print the current set of results, or access"
  1099.    Locate 6,21 : Print "this help page.   ";
  1100.    Inverse On 
  1101.    Print " Shortcut: press a number to load that set (0=10). "
  1102.    Inverse Off 
  1103. End If 
  1104. If((RESULT_GAME=3 or RESULT_GAME=5) and SECT=0) or SECT=3 or SECT=5
  1105.    Locate 2,15 : Print "h - The 'clue' word given;"
  1106. Else 
  1107.    If(RESULT_GAME=4 and SECT=0) or SECT=4
  1108.       Locate 2,15 : Print "h - Letters tried by the student;"
  1109.    End If 
  1110. End If 
  1111. If(RESULT_GAME>=3 and SECT=0) or SECT>=3
  1112.    Locate 2,16 : Print "i - The actual answer given by the student or OK if the answer is correct."
  1113.    Locate 6,17 : Print "'Not attempted' means <Esc> was pressed before this question was"
  1114.    Locate 6,18 : Print "reached, or that the exercise was not attempted;"
  1115.    Locate 2,19 : Print "j - Number of clues requested;"
  1116.    Locate 2,20 : Print "k - There are seven buttons on the screen, these allow you to navigate"
  1117.    Locate 6,21 : Print "through the results, print the current set of results, or access"
  1118.    Locate 6,22 : Print "this help page.   ";
  1119.    Inverse On 
  1120.    Print " Shortcut: press a number to load that set (0=10). "
  1121.    Inverse Off 
  1122. End If 
  1123. Ink 1 : Box 328,8 To 618,84
  1124. Draw 328,24 To 618,24
  1125. Draw 328,40 To 618,40
  1126. Draw 328,56 To 618,56
  1127. Draw 376,40 To 376,84
  1128. Draw 570,40 To 570,84
  1129. Locate 43,8 : Print "g"
  1130. Locate 44,2 : Print "a             b               c"
  1131. Locate 44,4 : Print "d             e               f"
  1132. Locate 43,10
  1133. Inverse On 
  1134. If((RESULT_GAME=1 or RESULT_GAME=2) and SECT=0) or SECT=1 or SECT=2
  1135.    Print Space$(15)+"j"+Space$(16)
  1136. Else 
  1137.    Print Space$(15)+"k"+Space$(16)
  1138. End If 
  1139. Inverse Off 
  1140. If((RESULT_GAME=1 or RESULT_GAME=2) and SECT=0) or SECT=1 or SECT=2
  1141.    Locate 58,8 : Print "h"
  1142.    Locate 74,8 : Print "i"
  1143. End If 
  1144. If((RESULT_GAME=3 or RESULT_GAME=5) and SECT=0) or SECT=3 or SECT=5
  1145.    Draw 424,40 To 424,84
  1146.    Locate 50,8 : Print "h"
  1147.    Locate 62,8 : Print "i"
  1148.    Locate 74,8 : Print "j"
  1149. End If 
  1150. If(RESULT_GAME=4 and SECT=0) or SECT=4
  1151.    Draw 464,40 To 464,84
  1152.    Locate 52,8 : Print "h"
  1153.    Locate 64,8 : Print "i"
  1154.    Locate 74,8 : Print "j"
  1155. End If 
  1156. Screen To Front 2
  1157. Clear Key 
  1158. Repeat 
  1159.    K$=Inkey$
  1160.    K=Scancode
  1161. Until K=$45 or(K=$50)
  1162. Screen To Front 1
  1163. Show On 
  1164. Goto RESULT_LOOP
  1165. RESULT_PRINT:
  1166. DEMO_MESSAGE["Printing Results","This is a demo version and there","are no printing facilities available.","","",""]
  1167. Goto RESULT_LOOP
  1168. '
  1169. VARIABLE_LOAD:
  1170. SOUND=1
  1171. LEVEL=1
  1172. CPENALTY=20
  1173. SECTION=0
  1174. VAR4=1
  1175. VAR5=0
  1176. CONCEAL=0
  1177. WRDTYP=0
  1178. DATE$=""
  1179. Return 
  1180. '
  1181. DISK_ERROR_DEFAULTS:
  1182. Pen 0 : Hide On : Boom 
  1183. XW=Screen Width(Screen)
  1184. Get Block 3,0,80,XW,48
  1185. Ink 15+(MDE=1)*12
  1186. Bar 32,83 To XW-32,125
  1187. Paper 15+(MDE=1)*12
  1188. Locate 0,11 : Centre "Disc read error!"
  1189. Locate 0,13 : Centre " "
  1190. Cdown : Centre "Press any key."
  1191. Clear Key 
  1192. Repeat 
  1193. Until(Inkey$<>"") or Mouse Key<>0
  1194. Bell 
  1195. Put Block 3
  1196. Del Block 3
  1197. Paper 0
  1198. Return 
  1199. '
  1200. DISK_READ_ERROR_HIRES:
  1201. Close 
  1202. Hide On 
  1203. Boom 
  1204. Get Block 3,32,80,608-32,125-80
  1205. Ink 3
  1206. Bar 32,83 To 608,125
  1207. Pen 0
  1208. Paper 3
  1209. Locate 0,11 : Centre "Insert BOOK of SPELLS disc"
  1210. Locate 0,12 : Centre "into the current drive"
  1211. Locate 0,14 : Centre "Press any key to retry"
  1212. Clear Key 
  1213. Repeat 
  1214. Until Inkey$<>"" or Mouse Key<>0
  1215. Bell 
  1216. Put Block 3
  1217. Del Block 3
  1218. F$=Dir First$("*.*")
  1219. Resume 
  1220. '
  1221. DISK_WRITE_ERROR:
  1222. Close 
  1223. Pen 0
  1224. Hide On 
  1225. Boom 
  1226. XW=Screen Width(Screen)
  1227. Get Block 3,0,10*8,XW,48
  1228. Ink 15+(MDE=1)*12
  1229. Bar 32,83 To XW-32,125
  1230. Paper 15+(MDE=1)*12
  1231. Locate 0,11 : Centre "Disk write error!"
  1232. Locate 0,13 : Centre " "
  1233. Cdown : Centre "Press any key."
  1234. Clear Key 
  1235. Repeat 
  1236. Until(Inkey$<>"" or Mouse Key<>0)
  1237. Bell 
  1238. Put Block 3
  1239. Update 
  1240. Put Block 3
  1241. Update 
  1242. Del Block 3
  1243. Paper 0
  1244. Resume DEFALTS_RESUME
  1245. '
  1246. DISK_WRITE_ERROR_RESULTS:
  1247. Close 
  1248. Hide On 
  1249. Boom 
  1250. Get Block 3,0,10*8,640,48
  1251. Ink 15+(MDE=1)*12
  1252. Bar 32,83 To 608,125
  1253. Paper 15+(MDE=1)*12
  1254. Locate 0,11 : Centre "Disk write error!"
  1255. Locate 0,13 : Centre " "
  1256. Cdown : Centre "Press any key."
  1257. Clear Key 
  1258. Repeat 
  1259. Until(Inkey$<>"" or Mouse Key<>0)
  1260. Bell 
  1261. Put Block 3
  1262. Del Block 3
  1263. Paper 0
  1264. Resume RESULTS_RESUME
  1265. '
  1266. WRITE_DEFAULT_SETTINGS:
  1267. DEMO_MESSAGE["Saving Defaults","This is a demo version and although","you may alter the settings here,","the program will still use the","restricted 'demo' settings.",""]
  1268. Return 
  1269. '
  1270. DEFALTS_RESUME:
  1271. On Error Goto BBER
  1272. Put Block 1
  1273. Del Block 1
  1274. Return 
  1275. '
  1276. CREATE_NEW_RESULTS:
  1277. Close 
  1278. Ink 1
  1279. Pen 1
  1280. Gosub DISK_ERROR_DEFAULTS
  1281. Resume CREATE_RESUME
  1282. '
  1283. CREATE_RESUME:
  1284. Ink 1
  1285. Pen 1
  1286. RESULTS_RESUME:
  1287. On Error Goto DISK_WRITE_ERROR_RESULTS
  1288. Open Out 1,"DATA/RESULTS"+Str$(RESULT_SET)-" "+".DAT"
  1289. Print #1,"LOW"
  1290. Print #1,"Scetlander"
  1291. Print #1,DATE$
  1292. Print #1,0
  1293. Print #1,5
  1294. For G=1 To 5
  1295.    Print #1,0
  1296.    For A=0 To 7
  1297.       A$=WRD$(Rnd(T0TWRD))
  1298.       Print #1,A$
  1299.       Print #1,""
  1300.       Print #1,"Not attempted"
  1301.       Print #1,""
  1302.       Print #1,""
  1303.       Print #1,A$
  1304.    Next A
  1305. Next G
  1306. Close 1
  1307. On Error Goto BBER
  1308. Goto RESULT_ERROR_RESUME
  1309. '
  1310. RETRIEVE_RESULTS:
  1311. RESULT_GAME=1
  1312. On Error Goto CREATE_NEW_RESULTS
  1313. Open In 1,"DATA/RESULTS"+Str$(RESULT_SET)-" "+".DAT"
  1314. Input #1,DIF$
  1315. Input #1,NAM$
  1316. Input #1,DAT$
  1317. Input #1,SECT
  1318. Input #1,WLEN
  1319. For G=1 To 5
  1320.    Input #1,QUESTION(G)
  1321.    I=0
  1322.    For A=0 To 7
  1323.       Input #1,RESULT$(G,I)
  1324.       Input #1,RESULT$(G,I+1)
  1325.       Input #1,RESULT$(G,I+2)
  1326.       Input #1,RESULT$(G,I+3)
  1327.       Input #1,RESULT$(G,I+4)
  1328.       Input #1,RESULT$(G,I+5)
  1329.       I=I+6
  1330.    Next A
  1331. Next G
  1332. Close 1
  1333. On Error Goto BBER
  1334. Goto RESULT_LOOP
  1335. '
  1336. DISK_WRITE_ERROR_WORDS:
  1337. Close 
  1338. Pen 0
  1339. Hide On 
  1340. Boom 
  1341. Get Cblock 3,0,10*8,320,48
  1342. Ink 15+(MDE=1)*12
  1343. Bar 32*2,83 To 288*2,125
  1344. Paper 15+(MDE=1)*12
  1345. Locate 0,11 : Centre "Disk write error!"
  1346. Locate 0,13 : Centre " "
  1347. Cdown : Centre "Press any key."
  1348. Clear Key 
  1349. Repeat 
  1350. Until(Inkey$<>"" or Mouse Key<>0)
  1351. Bell 
  1352. Put Cblock 3
  1353. Update 
  1354. Put Cblock 3
  1355. Update 
  1356. Del Cblock 3
  1357. Paper 0
  1358. Resume 3991
  1359. 3991
  1360. Goto RESTART_WORD_EDIT
  1361. '
  1362. NOISE_BELL:
  1363. If SOUND=1 Then Bell 
  1364. Return 
  1365. '
  1366. Procedure CLEAR_HELP_WINDOW
  1367.    For BB=1 To 19
  1368.       Locate 2,1+BB
  1369.       Print Space$(74);
  1370.    Next BB
  1371. End Proc
  1372. Procedure SPACER[SPC$,SPCSIZE]
  1373.    Lprint SPC$+Space$(SPCSIZE-Len(SPC$));
  1374. End Proc
  1375. Procedure DEMO_MESSAGE[T1$,S1$,S2$,S3$,S4$,S5$]
  1376. Freeze : Synchro Off : Bell 
  1377. Screen Open 7,320,90,4,Lowres : Curs Off : Palette ,$F0,$F00,$FF0 : Cls 0
  1378. Screen Display 1,,,,
  1379. Ink 2 : Bar 0,0 To 320,90 : Ink 1 : Box 2,2 To 318,88 : Paper 2
  1380. Locate 1,1 : Pen 1 : Print "DEMO VERSION: ";T1$
  1381. Pen 0 : Locate 1,3 : Print S1$
  1382. Locate 1,4 : Print S2$
  1383. Locate 1,5 : Print S3$
  1384. Locate 1,6 : Print S4$
  1385. Locate 1,7 : Print S5$
  1386. Pen 1 : Locate 8,9 : Print "Press <Space> to continue"
  1387. Clear Key : Wait Key : Screen Close 7 : Update On : Synchro On 
  1388. End Proc
  1389. Procedure CLEAR_BANKS
  1390.    For I=1 To 14
  1391.       Erase I
  1392.    Next 
  1393. End Proc
  1394. BBER:
  1395. DEMO_MESSAGE["Error Occured","An error from which the DEMO cannot","recover has occured.  The error was","number"+Str$(Errn)+".  Press any key to return","to the Workbench.",""]
  1396. End 
  1397. CLEAR_ARRAYS:
  1398. For X=1 To 500 : MAGWRD$(X)="" : Next X
  1399. For X=1 To 500 : TEMP$(X)="" : Next X
  1400. For X=1 To 500 : WRD$(X)="" : Next X
  1401. Return